import axios from '../utils/request';


const apis = 
{
	/* 登陆 */
	userLogin(data) {
		return axios.post('http://112.126.78.30:8087/oss/login', data,{ headers: {'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'}})
	},
	/*上传音频*/
	upDateBookAudio(data){
		return axios.post('http://112.126.78.30:8087/oss/addBookAudio', data)
	},
	/*新增书籍信息*/
	insterBookInfo(data){
		return axios.post('http://112.126.78.30:8087/oss/addBookInfo', data)
	},
	/*新增章节信息*/
	insteraddChapter(data){
		return axios.post('http://112.126.78.30:8087/oss/addChapter', data)
	},
	/*提交审核*/
	submitCommitAudit(data){
		return axios.post('http://112.126.78.30:8087/oss/commitAudit', data,{ headers: {'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'}})
	},
	/*获取分类下的书籍*/
	getAllBookByCategroyId(data){
		return axios.post('http://112.126.78.30:8087/oss/getAllBookByCategroyId', data)
	},
	/*获取书籍详情*/
	getBookCententInfo(data){
		return axios.post('http://112.126.78.30:8087/oss/getBookByBookId', data,{ headers: {'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'}})
	},
	/*获取分类*/
	getBookCategroy(data){
		return axios.post('http://112.126.78.30:8087/oss/getBookCategroy', data)
	},
	/*获取书籍下的章节*/
	getChapterByBookId(data){
		return axios.post('http://112.126.78.30:8087/oss/getChapterByBookId', data)
	},
	/*获取下拉框信息*/
	getDictData(data){
		return axios.post('http://112.126.78.30:8087/oss/getDictData', data,{ headers: {'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'}})
	},
	/* 待审核列表 */
	getWaitAuditList(data) {
		return axios.post('http://112.126.78.30:8087/oss/getWaitAuditList', data)
	},
	/**新增音频 */
	setUpDataAudio(data) {
		return axios.post('http://112.126.78.30:8087/oss/uploadAudio', data,{ headers: {'content-type': 'multipart/form-data'}})
	},
	/**新增封面 */
	setUpDataCover(data) {
		return axios.post('http://112.126.78.30:8087/oss/uploadCover', data)
	},
	/**新增封面 */
	uploadBookStatus(data) {
		return axios.post('http://112.126.78.30:8087/oss/uploadBookStatus', data,{ headers: {'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'}})
	},

	
}
const api = 
{
	/* 登陆 */
	userLogin(data) {
		return axios.post('/api/oss/login', data,{ headers: {'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'}})
	},
	/*上传音频*/
	upDateBookAudio(data){
		return axios.post('/api/oss/addBookAudio', data)
	},
	/*新增书籍信息*/
	insterBookInfo(data){
		return axios.post('/api/oss/addBookInfo', data)
	},
	/*新增章节信息*/
	insteraddChapter(data){
		return axios.post('/api/oss/addChapter', data)
	},
	/*提交审核*/
	submitCommitAudit(data){
		return axios.post('/api/oss/commitAudit', data,{ headers: {'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'}})
	},
	/*获取分类下的书籍*/
	getAllBookByCategroyId(data){
		return axios.post('/api/oss/getAllBookByCategroyId', data)
	},
	/*获取书籍详情*/
	getBookCententInfo(data){
		return axios.post('/api/oss/getBookByBookId', data,{ headers: {'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'}})
	},
	/*获取分类*/
	getBookCategroy(data){
		return axios.post('/api/oss/getBookCategroy', data)
	},
	/*获取书籍下的章节*/
	getChapterByBookId(data){
		return axios.post('/api/oss/getChapterByBookId', data)
	},
	/*获取下拉框信息*/
	getDictData(data){
		return axios.post('/api/oss/getDictData', data)
	},
	/* 待审核列表 */
	getWaitAuditList(data) {
		return axios.post('/api/oss/getWaitAuditList', data)
	},
	/**新增音频 */
	setUpDataAudio(data) {
		return axios.post('/api/oss/uploadAudio', data,{ headers: {'content-type': 'multipart/form-data'}})
	},
	/**新增封面 */
	setUpDataCover(data) {
		return axios.post('/api/oss/uploadCover', data)
	},

}
// export default api
export default apis